home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QuickTimeVRFormat.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  12.3 KB  |  397 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QuickTimeVRFormat.p
  3.  
  4.      Contains:    QuickTime VR interfaces
  5.  
  6.      Version:    Technology:    QuickTime VR 2.0.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QuickTimeVRFormat;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QUICKTIMEVRFORMAT__}
  28. {$SETC __QUICKTIMEVRFORMAT__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QuickTimeVRFormatIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __DIALOGS__}
  38. {$I Dialogs.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MOVIES__}
  41. {$I Movies.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __QUICKTIMEVR__}
  44. {$I QuickTimeVR.p}
  45. {$ENDC}
  46.  
  47.  
  48. {$PUSH}
  49. {$ALIGN MAC68K}
  50. {$LibExport+}
  51.  
  52. {  User data type for the Movie Controller type specifier }
  53.  
  54. CONST
  55.     kQTControllerType            = 'ctyp';                        {  Atom & ID of where our }
  56.     kQTControllerID                = 1;                            {  … controller name is stored }
  57.  
  58. {  VRWorld atom types }
  59.     kQTVRWorldHeaderAtomType    = 'vrsc';
  60.     kQTVRImagingParentAtomType    = 'imgp';
  61.     kQTVRPanoImagingAtomType    = 'impn';
  62.     kQTVRObjectImagingAtomType    = 'imob';
  63.     kQTVRNodeParentAtomType        = 'vrnp';
  64.     kQTVRNodeIDAtomType            = 'vrni';
  65.     kQTVRNodeLocationAtomType    = 'nloc';
  66.  
  67. {  NodeInfo atom types }
  68.     kQTVRNodeHeaderAtomType        = 'ndhd';
  69.     kQTVRHotSpotParentAtomType    = 'hspa';
  70.     kQTVRHotSpotAtomType        = 'hots';
  71.     kQTVRHotSpotInfoAtomType    = 'hsin';
  72.     kQTVRLinkInfoAtomType        = 'link';
  73.  
  74. {  Miscellaneous atom types }
  75.     kQTVRStringAtomType            = 'vrsg';
  76.     kQTVRPanoSampleDataAtomType    = 'pdat';
  77.     kQTVRObjectInfoAtomType        = 'obji';
  78.     kQTVRAngleRangeAtomType        = 'arng';
  79.     kQTVRTrackRefArrayAtomType    = 'tref';
  80.     kQTVRPanConstraintAtomType    = 'pcon';
  81.     kQTVRTiltConstraintAtomType    = 'tcon';
  82.     kQTVRFOVConstraintAtomType    = 'fcon';
  83.  
  84. {  Track reference types }
  85.     kQTVRImageTrackRefType        = 'imgt';
  86.     kQTVRHotSpotTrackRefType    = 'hott';
  87.  
  88. {  Old hot spot types }
  89.     kQTVRHotSpotNavigableType    = 'navg';
  90.  
  91. {  Valid bits used in QTVRLinkHotSpotAtom }
  92.     kQTVRValidPan                = $01;
  93.     kQTVRValidTilt                = $02;
  94.     kQTVRValidFOV                = $04;
  95.     kQTVRValidViewCenter        = $08;
  96.  
  97.  
  98. {  Values for flags field in QTVRPanoSampleAtom }
  99.     kQTVRPanoFlagHorizontal        = $01;
  100.     kQTVRPanoFlagLast            = $80000000;
  101.  
  102.  
  103. {  Values for locationFlags field in QTVRNodeLocationAtom }
  104.     kQTVRSameFile                = 0;
  105.  
  106.  
  107. {  Header for QTVR track's Sample Description record (vrWorld atom container is appended) }
  108.  
  109. TYPE
  110.     QTVRSampleDescriptionPtr = ^QTVRSampleDescription;
  111.     QTVRSampleDescription = RECORD
  112.         descSize:                UInt32;                                    {  total size of the QTVRSampleDescription }
  113.         descType:                UInt32;                                    {  must be 'qtvr' }
  114.         reserved1:                UInt32;                                    {  must be zero }
  115.         reserved2:                UInt16;                                    {  must be zero }
  116.         dataRefIndex:            UInt16;                                    {  must be zero }
  117.         data:                    UInt32;                                    {  Will be extended to hold vrWorld QTAtomContainer }
  118.     END;
  119.  
  120.     QTVRSampleDescriptionHandle            = ^QTVRSampleDescriptionPtr;
  121. {
  122.   =================================================================================================
  123.    Definitions and structures used in the VRWorld QTAtomContainer
  124.   -------------------------------------------------------------------------------------------------
  125. }
  126.  
  127.  
  128.     QTVRStringAtomPtr = ^QTVRStringAtom;
  129.     QTVRStringAtom = RECORD
  130.         stringUsage:            UInt16;
  131.         stringLength:            UInt16;
  132.         theString:                PACKED ARRAY [0..3] OF UInt8;            {  field previously named "string" }
  133.     END;
  134.  
  135.  
  136.  
  137.     QTVRWorldHeaderAtomPtr = ^QTVRWorldHeaderAtom;
  138.     QTVRWorldHeaderAtom = RECORD
  139.         majorVersion:            UInt16;
  140.         minorVersion:            UInt16;
  141.         nameAtomID:                QTAtomID;
  142.         defaultNodeID:            UInt32;
  143.         vrWorldFlags:            UInt32;
  144.         reserved1:                UInt32;
  145.         reserved2:                UInt32;
  146.     END;
  147.  
  148.  
  149. {  Valid bits used in QTVRPanoImagingAtom }
  150.  
  151. CONST
  152.     kQTVRValidCorrection        = $01;
  153.     kQTVRValidQuality            = $02;
  154.     kQTVRValidDirectDraw        = $04;
  155.     kQTVRValidFirstExtraProperty = $08;
  156.  
  157.  
  158. TYPE
  159.     QTVRPanoImagingAtomPtr = ^QTVRPanoImagingAtom;
  160.     QTVRPanoImagingAtom = RECORD
  161.         majorVersion:            UInt16;
  162.         minorVersion:            UInt16;
  163.         imagingMode:            UInt32;
  164.         imagingValidFlags:        UInt32;
  165.         correction:                UInt32;
  166.         quality:                UInt32;
  167.         directDraw:                UInt32;
  168.         imagingProperties:        ARRAY [0..5] OF UInt32;                    {  for future properties }
  169.         reserved1:                UInt32;
  170.         reserved2:                UInt32;
  171.     END;
  172.  
  173.     QTVRNodeLocationAtomPtr = ^QTVRNodeLocationAtom;
  174.     QTVRNodeLocationAtom = RECORD
  175.         majorVersion:            UInt16;
  176.         minorVersion:            UInt16;
  177.         nodeType:                OSType;
  178.         locationFlags:            UInt32;
  179.         locationData:            UInt32;
  180.         reserved1:                UInt32;
  181.         reserved2:                UInt32;
  182.     END;
  183.  
  184. {
  185.   =================================================================================================
  186.    Definitions and structures used in the Nodeinfo QTAtomContainer
  187.   -------------------------------------------------------------------------------------------------
  188. }
  189.  
  190.     QTVRNodeHeaderAtomPtr = ^QTVRNodeHeaderAtom;
  191.     QTVRNodeHeaderAtom = RECORD
  192.         majorVersion:            UInt16;
  193.         minorVersion:            UInt16;
  194.         nodeType:                OSType;
  195.         nodeID:                    QTAtomID;
  196.         nameAtomID:                QTAtomID;
  197.         commentAtomID:            QTAtomID;
  198.         reserved1:                UInt32;
  199.         reserved2:                UInt32;
  200.     END;
  201.  
  202.     QTVRAngleRangeAtomPtr = ^QTVRAngleRangeAtom;
  203.     QTVRAngleRangeAtom = RECORD
  204.         minimumAngle:            Float32;
  205.         maximumAngle:            Float32;
  206.     END;
  207.  
  208.     QTVRHotSpotInfoAtomPtr = ^QTVRHotSpotInfoAtom;
  209.     QTVRHotSpotInfoAtom = RECORD
  210.         majorVersion:            UInt16;
  211.         minorVersion:            UInt16;
  212.         hotSpotType:            OSType;
  213.         nameAtomID:                QTAtomID;
  214.         commentAtomID:            QTAtomID;
  215.         cursorID:                ARRAY [0..2] OF SInt32;
  216.                                                                         {  canonical view for this hot spot }
  217.         bestPan:                Float32;
  218.         bestTilt:                Float32;
  219.         bestFOV:                Float32;
  220.         bestViewCenter:            QTVRFloatPoint;
  221.                                                                         {  Bounding box for this hot spot }
  222.         hotSpotRect:            Rect;
  223.         flags:                    UInt32;
  224.         reserved1:                UInt32;
  225.         reserved2:                UInt32;
  226.     END;
  227.  
  228.     QTVRLinkHotSpotAtomPtr = ^QTVRLinkHotSpotAtom;
  229.     QTVRLinkHotSpotAtom = RECORD
  230.         majorVersion:            UInt16;
  231.         minorVersion:            UInt16;
  232.         toNodeID:                UInt32;
  233.         fromValidFlags:            UInt32;
  234.         fromPan:                Float32;
  235.         fromTilt:                Float32;
  236.         fromFOV:                Float32;
  237.         fromViewCenter:            QTVRFloatPoint;
  238.         toValidFlags:            UInt32;
  239.         toPan:                    Float32;
  240.         toTilt:                    Float32;
  241.         toFOV:                    Float32;
  242.         toViewCenter:            QTVRFloatPoint;
  243.         distance:                Float32;
  244.         flags:                    UInt32;
  245.         reserved1:                UInt32;
  246.         reserved2:                UInt32;
  247.     END;
  248.  
  249. {
  250.   =================================================================================================
  251.    Definitions and structures used in Panorama and Object tracks
  252.   -------------------------------------------------------------------------------------------------
  253. }
  254.  
  255.     QTVRPanoSampleAtomPtr = ^QTVRPanoSampleAtom;
  256.     QTVRPanoSampleAtom = RECORD
  257.         majorVersion:            UInt16;
  258.         minorVersion:            UInt16;
  259.         imageRefTrackIndex:        UInt32;                                    {  track reference index of the full res image track }
  260.         hotSpotRefTrackIndex:    UInt32;                                    {  track reference index of the full res hot spot track }
  261.         minPan:                    Float32;
  262.         maxPan:                    Float32;
  263.         minTilt:                Float32;
  264.         maxTilt:                Float32;
  265.         minFieldOfView:            Float32;
  266.         maxFieldOfView:            Float32;
  267.         defaultPan:                Float32;
  268.         defaultTilt:            Float32;
  269.         defaultFieldOfView:        Float32;
  270.                                                                         {  Info for highest res version of image track }
  271.         imageSizeX:                UInt32;                                    {  pixel width of the panorama (e.g. 768) }
  272.         imageSizeY:                UInt32;                                    {  pixel height of the panorama (e.g. 2496) }
  273.         imageNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  274.         imageNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  275.                                                                         {  Info for highest res version of hotSpot track }
  276.         hotSpotSizeX:            UInt32;                                    {  pixel width of the hot spot panorama (e.g. 768) }
  277.         hotSpotSizeY:            UInt32;                                    {  pixel height of the hot spot panorama (e.g. 2496) }
  278.         hotSpotNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  279.         hotSpotNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  280.         flags:                    UInt32;
  281.         reserved1:                UInt32;
  282.         reserved2:                UInt32;
  283.     END;
  284.  
  285. {  Special resolution value for the FastStart low resolution image track }
  286.  
  287. CONST
  288.     kQTVRFastStartTrackRes        = $8000;
  289.  
  290.  
  291. TYPE
  292.     QTVRTrackRefEntryPtr = ^QTVRTrackRefEntry;
  293.     QTVRTrackRefEntry = RECORD
  294.         trackRefType:            UInt32;
  295.         trackResolution:        UInt16;
  296.         trackRefIndex:            UInt32;
  297.     END;
  298.  
  299. {
  300.   =================================================================================================
  301.    Object File format 2.0
  302.   -------------------------------------------------------------------------------------------------
  303. }
  304.  
  305. CONST
  306.     kQTVRObjectAnimateViewFramesOn = $01;
  307.     kQTVRObjectPalindromeViewFramesOn = $02;
  308.     kQTVRObjectStartFirstViewFrameOn = $04;
  309.     kQTVRObjectAnimateViewsOn    = $08;
  310.     kQTVRObjectPalindromeViewsOn = $10;
  311.     kQTVRObjectSyncViewToFrameRate = $20;
  312.     kQTVRObjectDontLoopViewFramesOn = $40;
  313.  
  314.     kQTVRObjectWrapPanOn        = $01;
  315.     kQTVRObjectWrapTiltOn        = $02;
  316.     kQTVRObjectCanZoomOn        = $04;
  317.     kQTVRObjectReverseHControlOn = $08;
  318.     kQTVRObjectReverseVControlOn = $10;
  319.     kQTVRObjectSwapHVControlOn    = $20;
  320.     kQTVRObjectTranslationOn    = $40;
  321.  
  322.     kGrabberScrollerUI            = 1;                            {  "Object"  }
  323.     kOldJoyStickUI                = 2;                            {   "1.0 Object as Scene"      }
  324.     kJoystickUI                    = 3;                            {  "Object In Scene" }
  325.     kGrabberUI                    = 4;                            {  "Grabber only" }
  326.     kAbsoluteUI                    = 5;                            {  "Absolute pointer" }
  327.  
  328.  
  329.  
  330. TYPE
  331.     QTVRObjectSampleAtomPtr = ^QTVRObjectSampleAtom;
  332.     QTVRObjectSampleAtom = RECORD
  333.         majorVersion:            UInt16;                                    {  kQTVRMajorVersion }
  334.         minorVersion:            UInt16;                                    {  kQTVRMinorVersion }
  335.         movieType:                UInt16;                                    {  ObjectUITypes }
  336.         viewStateCount:            UInt16;                                    {  The number of view states 1 based }
  337.         defaultViewState:        UInt16;                                    {  The default view state number. The number must be 1 to viewStateCount }
  338.         mouseDownViewState:        UInt16;                                    {  The mouse down view state.   The number must be 1 to viewStateCount }
  339.         viewDuration:            UInt32;                                    {  The duration of each view including all animation frames in a view }
  340.         columns:                UInt32;                                    {  Number of columns in movie }
  341.         rows:                    UInt32;                                    {  Number rows in movie }
  342.         mouseMotionScale:        Float32;                                {  180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene. }
  343.         minPan:                    Float32;                                {  Start   horizontal pan angle in degrees }
  344.         maxPan:                    Float32;                                {  End     horizontal pan angle in degrees }
  345.         defaultPan:                Float32;                                {  Initial horizontal pan angle in degrees (poster view) }
  346.         minTilt:                Float32;                                {  Start   vertical   pan angle in degrees }
  347.         maxTilt:                Float32;                                {  End     vertical   pan angle in degrees }
  348.         defaultTilt:            Float32;                                {  Initial vertical   pan angle in degrees (poster view)     }
  349.         minFieldOfView:            Float32;                                {  minimum field of view setting (appears as the maximum zoom effect) must be >= 1 }
  350.         fieldOfView:            Float32;                                {  the field of view range must be >= 1 }
  351.         defaultFieldOfView:        Float32;                                {  must be in minFieldOfView and maxFieldOfView range inclusive }
  352.         defaultViewCenterH:        Float32;
  353.         defaultViewCenterV:        Float32;
  354.         viewRate:                Float32;
  355.         frameRate:                Float32;
  356.         animationSettings:        UInt32;                                    {  32 reserved bit fields }
  357.         controlSettings:        UInt32;                                    {  32 reserved bit fields }
  358.     END;
  359.  
  360. {$IFC OLDROUTINENAMES }
  361.     VRStringAtom                        = QTVRStringAtom;
  362.     VRStringAtomPtr                     = ^VRStringAtom;
  363.     VRWorldHeaderAtom                    = QTVRWorldHeaderAtom;
  364.     VRWorldHeaderAtomPtr                 = ^VRWorldHeaderAtom;
  365.     VRPanoImagingAtom                    = QTVRPanoImagingAtom;
  366.     VRPanoImagingAtomPtr                 = ^VRPanoImagingAtom;
  367.     VRNodeLocationAtom                    = QTVRNodeLocationAtom;
  368.     VRNodeLocationAtomPtr                 = ^VRNodeLocationAtom;
  369.     VRNodeHeaderAtom                    = QTVRNodeHeaderAtom;
  370.     VRNodeHeaderAtomPtr                 = ^VRNodeHeaderAtom;
  371.     VRAngleRangeAtom                    = QTVRAngleRangeAtom;
  372.     VRAngleRangeAtomPtr                 = ^VRAngleRangeAtom;
  373.     VRHotSpotInfoAtom                    = QTVRHotSpotInfoAtom;
  374.     VRHotSpotInfoAtomPtr                 = ^VRHotSpotInfoAtom;
  375.     VRLinkHotSpotAtom                    = QTVRLinkHotSpotAtom;
  376.     VRLinkHotSpotAtomPtr                 = ^VRLinkHotSpotAtom;
  377.     VRPanoSampleAtom                    = QTVRPanoSampleAtom;
  378.     VRPanoSampleAtomPtr                 = ^VRPanoSampleAtom;
  379.     VRTrackRefEntry                        = QTVRTrackRefEntry;
  380.     VRTrackRefEntryPtr                     = ^VRTrackRefEntry;
  381.     VRObjectSampleAtom                    = QTVRObjectSampleAtom;
  382.     VRObjectSampleAtomPtr                 = ^VRObjectSampleAtom;
  383. {$ENDC}  {OLDROUTINENAMES}
  384.  
  385.  
  386.  
  387. {$ALIGN RESET}
  388. {$POP}
  389.  
  390. {$SETC UsingIncludes := QuickTimeVRFormatIncludes}
  391.  
  392. {$ENDC} {__QUICKTIMEVRFORMAT__}
  393.  
  394. {$IFC NOT UsingIncludes}
  395.  END.
  396. {$ENDC}
  397.